package day8;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Calendar;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Ava {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入文件名：");
        String birth = sc.nextLine();
        try {
            System.out.println("实际大小："+new File(birth).length());
            FileInputStream fin=new FileInputStream(birth);
            long ava=fin.available();//available收到内存的限制
            System.out.println("一次可读取字节："+ava);
            fin.close();
        } catch ( Exception e) {
            e.printStackTrace();
        }

    }
}
